package com.zxx.xin.shorthand.app;

import android.content.Context;
import android.os.Handler;


/**
 * Created by xin on 2018/3/17.
 */

public class ApplicationHelper {
    private static Context sContext;

    private static Handler sWorkHandler;

    private static Handler sMainHandler;

    public static void init(Context context, Handler workHandler, Handler mainHandler){
        sContext = context;
        sWorkHandler = workHandler;
        sMainHandler = mainHandler;
    }

    public static Context getContext(){
        if (sContext == null){
            throw new RuntimeException("init ApplicationHelper first");
        }
        return sContext;
    }
}
